/*
 * Phrase.java
 *
 * Created on 2007��9��29��, ����5:12
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.microweb.toastmaster.model;


import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 *
 * @author zhengyd
 *
 */
public class Phrase extends BaseObject implements Serializable {
    
    protected String phrase;
    protected String example;
    protected String definition;
    

    /**
     * @hibernate.property column="phrase"  length="150"
     */
    public String getPhrase() {
        return phrase;
    }
    
    public void setPhrase(String phrase) {
        this.phrase = phrase;
    }
    
    /**
     * @hibernate.property column="phrase_definition"  length="150"
     */
    public String getDefinition() {
        return definition;
    }
    
    public void setDefinition(String definition) {
        this.definition = definition;
    }
    
    /**
     * @hibernate.property column="phrase_example" length="200"
     */
    public String getExample() {
        return example;
    }
    
    public void setExample(String example) {
        this.example = example;
    }
    
    
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Phrase)) return false;

        final Phrase phrase1 = (Phrase) o;

        if (phrase != null ? !phrase.equals(phrase1.getPhrase()) : phrase1.getPhrase() != null) return false;

        return true;
    }

    public int hashCode() {
        return (phrase != null ? phrase.hashCode() : 0);
    }

    public String toString() {
        ToStringBuilder sb = new ToStringBuilder(this,
                ToStringStyle.DEFAULT_STYLE).append("phrase", this.phrase)
		.append("example", this.example);
        
        return sb.toString();
    }
    
}
